import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
@Entity()
export class User {

  //基本信息字段
  @PrimaryGeneratedColumn({comment: '自增ID'})
  id: number;
  @Column({comment: '邮箱',nullable: true,})

  email: string;


  @Column({comment: '密码',nullable: true,})

  password: string;

  @Column({comment: '电话',nullable: true,})

  phone: number;


  //个人资料字段

  @Column({comment: '昵称',nullable: true,})

  nickname: string;

  @Column({comment: '性别',nullable: true,})

  gender: string;

  @Column({comment: 'steamID',nullable: true,})

  steamID: number;

  //状态和权限字段

  @Column({ comment: '用户角色', nullable: true, })

  role: string;

  // 安全相关字段：
  @Column({ comment: '账户创建时间' }) // 自动添加创建时间
  created_at: string;

  @Column({ comment: '账户更新时间' }) // 自动添加更新时间
  updated_at: string;


  @Column({ comment: '上次登录时间', nullable: true, })

  last_login: string;

  @Column({comment: '上次登录IP',nullable: true,})

  last_ip: string;

  @Column({comment: '密码重置令牌',nullable: true,})

  reset_password_token: string;

  @Column({comment: '密码重置过期时间',nullable: true,})

  reset_password_token_expire: Date;

  //社交账号集成：
  @Column({comment: 'qq开放ID',nullable: true,})

  qq_openid: string;

  @Column({comment: '微信开发ID',nullable: true,})

  wechat_openid: string;

  //扩展性：
  @Column({comment: '用户其他资料，如头像等',nullable: true,})
  user_profile: string;



}